package com.maibow.util;

import org.springframework.context.ApplicationContext;

/**
 * 
 * 脉博网络后台管理系统
 * 包名：com.maibow.util
 * 文件名：CommonConstants.java
 * 作者: 吴比(Wubi)
 * 时间：2015年4月2日-上午9:12:57
 * Copyright@ 2015湖南脉博网络科技有限公司-版权所有
 *
 */
public class CommonConstants {
    public static final String SESSION_OPERATOR = "sessionOperator";

    public static final String SESSION_SECURITY_CODE = "sessionSecCode";

    public static final String SESSION_OPERATOR_ROLE = "operatorRole"; // 操作员对象

    public static final String SESSION_OPERATOR_NAME = "operatorName"; // 操作员名称

    public static final String SESSION_MODULE_LIST = "moduleList"; // 当前模块

    public static final String MAIN_LOGIN = "/login_toLogin.do"; // 登录地址

    public static final String SESSION_OPERATOR_PAGEDATAS = "operatorPageDatas";

    public static final String OPER_PRIVILEGE_QUERY = "view";

    public static final String OPER_PRIVILEGE_ADD = "add";

    public static final String OPER_PRIVILEGE_EDIT = "edit";

    public static final String OPER_PRIVILEGE_DELETE = "delete";

    public static final String OPER_PRIVILEGE_UPLOAD = "upload";

    public static final String OPER_PRIVILEGE_DOWNLOAD = "download";

    public static final String MODULE_URL_SYS_OPERATOR = "newuser/listUsers.do";

    /****************************************************************************************************************************************************/

    public static final String SESSION_USER = "sessionUser";

    public static final String SESSION_ROLE_RIGHTS = "sessionRoleRights";

    public static final String SESSION_menuList = "menuList"; // 当前菜单

    public static final String SESSION_allmenuList = "allmenuList"; // 全部菜单

    public static final String SESSION_QX = "QX";

    public static final String SESSION_userpds = "userpds";

    public static final String SESSION_USERROL = "USERROL"; // 用户对象

    public static final String SESSION_USERNAME = "USERNAME"; // 用户名

    public static final String TRUE = "T";

    public static final String FALSE = "F";

    public static final String LOGIN = "/login_toLogin.do"; // 登录地址

    public static final String SYSNAME = "admin/config/SYSNAME.txt"; // 系统名称路径

    public static final String PAGE = "admin/config/PAGE.txt"; // 分页条数配置路径

    public static final String EMAIL = "admin/config/EMAIL.txt"; // 邮箱服务器配置路径

    public static final String SMS1 = "admin/config/SMS1.txt"; // 短信账户配置路径1

    public static final String SMS2 = "admin/config/SMS2.txt"; // 短信账户配置路径2

    public static final String FILEPATHIMG = "uploadFiles/uploadImgs/"; // 图片上传路径

    public static final String FILEPATHFILE = "uploadFiles/file/"; // 文件上传路径

    public static final String FILEPATHTWODIMENSIONCODE = "uploadFiles/twoDimensionCode/"; // 二维码存放路径

    public static final String NO_INTERCEPTOR_PATH = ".*/((login)|(logout)|(verifyCode)|(app)|(api)|(websocket)).*"; // 不对匹配该值的访问路径拦截（正则）

    public static ApplicationContext WEB_APP_CONTEXT = null; // 该值会在web容器启动时由WebAppContextListener初始化

    /**
     * APP Constants
     */
    // app注册接口_请求协议参数)
    public static final String[] APP_REGISTERED_PARAM_ARRAY = new String[] { "countries", "uname", "passwd", "title", "full_name", "company_name", "countries_code", "area_code", "telephone", "mobile" };

    public static final String[] APP_REGISTERED_VALUE_ARRAY = new String[] { "国籍", "邮箱帐号", "密码", "称谓", "名称", "公司名称", "国家编号", "区号", "电话", "手机号" };

    // app登录接口_请求协议中的参数
    public static final String[] APP_LOGIN_PARAM_ARRAY = new String[] { "uname", "passwd" };

    public static final String[] APP_LOGIN_VALUE_ARRAY = new String[] { "邮箱账号", "密码" };

    // app登录状态接口_请求协议中的参数
    public static final String[] APP_LOGINSTATUS_PARAM_ARRAY = new String[] { "app_id", "status" };

    public static final String[] APP_LOGINSTATUS_VALUE_ARRAY = new String[] { "app登录用户ID", "登录状态" };

    // 忘记密码,查找用户账户是否存在接口_请求协议中的参数
    public static final String[] APP_FORGOTPASSWORD_PARAM_ARRAY = new String[] { "uname" };

    public static final String[] APP_FORGOTPASSWORD_VALUE_ARRAY = new String[] { "邮箱账号" };

    public static final String appKey = "z3v5yqkbvn520";

    public static final String appSecret = "uSEaEBqTxoDGE";

    public static final String APP_SERVICE_IP = "http://121.40.95.227:";

    public static final String APP_SERVICE_PORT = "8081";

    /**
     * 融云接口
     */
    public static final String APP_SERVICE_API_MEMBER_TOKEN = APP_SERVICE_IP + APP_SERVICE_PORT + "/meet/api/memberToken";

    /**
     * 修改会员信息接口
     */
    public static final String APP_SERVICE_API_MEMBER_MODIFY = APP_SERVICE_IP + APP_SERVICE_PORT + "/meet/api/mbmodify";

    /**
     * API请求代码. 100-200
     */
    public final static class ApiCode {

        /**
         * 成功
         */
        public final static int OK = 100;

        /**
         * 业务异常(非正常，不可预计)
         */
        public final static int ERROR = 101;

        /**
         * 业务失败(业务正常，但是验证错误)
         */
        public final static int FAILURE = 103;

        /**
         * 服务器链接异常
         */
        public final static int SERVER_CONNECTION_ERROR = 104;
    }

    /**
     * 单个推送
     */
    public final static String SYSTEM_MSG_PUSH_SCOPE_SINGLE = "1";

    /**
     * 多个推送
     */
    public final static String SYSTEM_MSG_PUSH_SCOPE_MULTIPLE = "2";

    /**
     * 全部推送
     */
    public final static String SYSTEM_MSG_PUSH_SCOPE_ALL = "3";

    public final static String SERVICE_API_HTTP_URI = "http://www.hnczwl.cn:8081";

    // public final static String
    // SERVICE_API_HTTP_URI =
    // "http://192.168.1.110:8081";

    // public final static String
    // SERVICE_API_HTTP_URI =
    // "http://127.0.0.1:8081";

    /**
     * 消费订单
     */
    public final static String ORDER_TYPE_CO001 = "CO001";

    /**
     * 服务订单
     */
    public final static String ORDER_TYPE_CO002 = "CO002";

    /**
     * 充值订单
     */
    public final static String ORDER_TYPE_CO003 = "CO003";

    /**
     * 提现订单
     */
    public final static String ORDER_TYPE_CO004 = "CO004";

    /**
     * 退款订单
     */
    public final static String ORDER_TYPE_CO005 = "CO005";

    /**
     * 刷卡订单
     */
    public final static String ORDER_TYPE_CO006 = "CO006";

    /**
     * 未付款
     */
    public final static String ORDER_STATUS_1 = "1";

    /**
     * 已付款
     */
    public final static String ORDER_STATUS_3 = "3";

    /**
     * 已退款
     */
    public final static String ORDER_STATUS_4 = "4";

    /**
     * 交易取消
     */
    public final static String ORDER_STATUS_5 = "5";

    /**
     * 交易关闭
     */
    public final static String ORDER_STATUS_6 = "6";

    /**
     * 交易成功
     */
    public final static String ORDER_STATUS_7 = "7";

    /**
     * 正在退款
     */
    public final static String ORDER_STATUS_8 = "8";

    /**
     * 退款未处理
     */
    public final static String ORDER_REFUND_STATUS_REFUND_INIT = "REFUND_INIT";

    /**
     * 退款已经提交至支付宝或微信
     */
    public final static String ORDER_REFUND_STATUS_REFUND_SUBMIT = "REFUND_SUBMIT";

    /**
     * 退款已完成
     */
    public final static String ORDER_REFUND_STATUS_REFUND_SUCCES = "REFUND_SUCCES";

    public static final double SHORT_MSG_RATE = 0.07; // 登录地址
}
